package com.platform.api.bzproject.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.platform.api.bzproject.model.BzWallpaper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author guoyunfei on 2021/7/9 14:04
 * @className BzWallpaperMapper
 * @description TODO
 * @Version 1.0
 */
public interface BzWallpaperMapper extends BaseMapper<BzWallpaper> {

    List<BzWallpaper> selectPage(BzWallpaper wallpaper);

    List<BzWallpaper> selectPageNew(BzWallpaper wallpaper);

    int updateBrowseCount(Map<String,Object> map);

    int updateDownCount(Map<String,Object> map);

    int updateShareCount(Map<String,Object> map);

    int updateCollectionCount(Map<String,Object> map);

    //减少收藏数量
    int updateSubCollectionCount(Map<String,Object> map);
    //修改点赞数量
    int updateLikeCount(Map<String,Object> map);
    //减少点赞数量
    int updateSubLikeCount(Map<String,Object> map);

    //查询前后一条记录  按照时间查询
    BzWallpaper getLimitOneLeft(Map<String,Object> map);
    BzWallpaper getLimitOneRight(Map<String,Object> map);

    List<Map<String,Object>> getHots(String appid);


    BzWallpaper getById(@Param("id") Integer id);

}
